# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=tracedump
pkgver=23.921e0f2
pkgrel=3
pkgdesc='tcpdump of single programs - captures all tcp andudp packets of a signle program.'
groups=('blackarch' 'blackarch-sniffer')
arch=('x86_64' 'aarch64')
url='https://github.com/iitis/tracedump'
license=('GPL3')
depends=('gcc-libs' 'gcc' 'libpcap' 'libpjf' 'pcre' 'linux-headers')
makedepends=('git')
source=("git+https://github.com/iitis/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.markdown doc/*
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

